package com.yuan.model_community.repository;

import com.yuan.model_community.domain.CommunityParking;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CommunityParkingDao extends JpaRepository<CommunityParking, Integer>, JpaSpecificationExecutor<CommunityParking> {
    @Query(value = "select park from CommunityParking park where park.liverId = :userId")
    List<CommunityParking> findParkingByUserId(Long userId);
}
